<template>
  <el-dialog
    title="创建用户"
    :visible="showDialog"
    width="600px"
    @close="btnCancel"
  >
    <el-form label-width="180px">
      <el-form-item label="用户名">
        <el-input></el-input>
      </el-form-item>
      <el-form-item label="邮箱">
        <el-input></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input></el-input>
      </el-form-item>
      <el-form-item label="角色">
        <el-input></el-input>
      </el-form-item>
      <el-form-item label="权限组名称">
        <el-select value="" placeholder="请选择">
          <el-option value="item1" label="item1"> </el-option>
          <el-option value="item2" label="item2"> </el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="联系电话">
        <el-input></el-input>
      </el-form-item>
      <el-form-item label="介绍">
        <el-input
          type="textarea"
          rows="2"
          placeholder="Please input"
        ></el-input>
      </el-form-item>
    </el-form>
    <!-- footer -->
    <template slot="footer">
      <el-button @click="btnCancel">取消</el-button>
      <el-button type="primary" @click="btnOk">确定</el-button>
    </template>
  </el-dialog>
</template>

<script>
export default {
  props: {
    showDialog: {
      type: Boolean,
      default: false,
    },
  },
  methods: {
    btnCancel() {
      this.$emit("update:showDialog", false);
    },
    btnOk() {
      this.$emit("update:showDialog", false);
    },
  },
};
</script>
